<template>
<!-- 修改投保单 -->
    <div>
        <policy-list v-if="show" :type="'修改'" ref="list" @changeInformation="changeInformation">
        </policy-list>
        <el-dialog title="修改投保单" :visible.sync="changeShow"  v-if="changeShow" size="large" >
            <el-form ref="form" label-width="80px" :model="saleDetail">               
                <el-form-item label="审核意见">
                    <el-input type="textarea" v-model="saleDetail.SALESDETAIL_CHECKMESSAGE"></el-input>
                </el-form-item>
            </el-form>
            <div style="height:600px; overflow:scroll">
                <policy-show :type="'修改'" @close="close">
            </policy-show>
            </div>
        </el-dialog>
    </div>
</template>

<script>
import PolicyList from "@/components/Sell/PolicyList";
import PolicyShow from "@/components/Sell/policyShow";
import { mapState } from "vuex";
export default {
  data() {
    return {
      show: false,
      changeShow: false
    };
  },
  components: {
    "policy-list": PolicyList,
    "policy-show": PolicyShow
  },
    computed: mapState({
    saleDetail: state => state.SealDetail.model
  }),
  methods: {
    changeInformation() {
      this.changeShow = true;
    },
    close() {
      this.$refs.list.getDate();
      this.changeShow = false;
    }
  },  
  activated() {
    this.show = true;
    try {
      this.$refs.list.getDate();
    } catch (error) {
      
    }
  }
};
</script>

<style>

</style>
